def doGet(request, session):
	ret = True
	message = ""
	json = {}
	
	tagPath = request["params"].get("tagpath", None)
	if tagPath == None:
		ret = False
		message = "No tag path supplied"
	else:
		if system.tag.exists(tagPath):
			tagValue = system.tag.read(tagPath).value
			json["tagPath"] = tagPath
			json["tagValue"] = tagValue
		else:
			ret = False
			message = "Tag '%s' doesn't exist" % tagPath
		
	json["success"] = ret
	json["message"] = message
	
	return {'json': system.util.jsonEncode(json)}